<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <input type="checkbox" style="color: red; font-size: 2rem" id="elInput" />
    <script>
      const elInput = document.getElementById("elInput");
      // ''=>true; null=false
      console.log(elInput.getAttribute("checked"));
      console.log(elInput.checked);

      console.log(elInput.getAttribute("style"));
      console.log(elInput.style);
      console.log(elInput.style.color);
      console.log(elInput.style.fontSize);
    </script>
  </body>
</html>
